<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery-1.10.1.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			* {
				margin: 0;
				padding: 0;
			}
		</style>
	</head>

	<body>
		<ul>

		</ul>
	</body>
	<script type="text/javascript">
		var str = "";
		for(var i = 0; i < 15; i++) {
			str += "<li>" + "第" + 　i + "项" + "</li>";
		}
		$("ul").html(str)
		var arr = document.getElementsByTagName("li")
		for(var i = 0; i < arr.length; i++) {
			(function(i) {
				console.log(i)
				setTimeout(function() {
					if(arr[i].dataset) { //兼容不支持data的浏览器
						aftLoadImg(arr[i], arr[i].dataset.imgurl);
					} else {
						aftLoadImg(arr[i], arr[i].getAttribute("data-imgurl"));
					}
					 // arr[i].style.cssText = "transition: 1s; opacity: 1;" //相当于fadein
				}, 500)

			})(i)

		}

		function aftLoadImg(index, indexuir) {
			console.log(index)

		}
	</script>

</html>